/*************************************************************************
> File Name: stack.h
> Author: icebear
> Mail: 3322366195@qq.com
> Created Time: 2023-07-24 20:08:03
> Description: 基于链表的栈
************************************************************************/
#ifndef STACK_H
#define STACK_H
typedef struct DATA
{
    int value;
} Data;

typedef struct NODE
{
    struct NODE *next;
    Data *data;
} Node;

typedef struct STACK
{
    Node *head;
    int size;
} Stack;
Stack *create();
int destory(Stack *stack);
void push(Stack *stack, int item);
int pop(Stack *stack);
int peek(Stack *stack);
int isEmpty(Stack *stack);
int size(Stack *stack);
#endif